<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
*{
	margin: 0px;
	padding: 0px;
}
</style>
</head>
<body>
	<div style="position: absolute;width: 100%; height: 100%">
		<video style="width: 100%; height: 100%;object-fit: fill;" id="video" autoplay="autoplay" muted controls="controls"></video>
	</div>
</body>
<script src="js/jquery-2.1.4.min.js" type="text/javascript"></script>
<script src="js/stomp.js" type="text/javascript"></script>
<script src="js/websocket.js" type="text/javascript"></script>
<script src="js/collection.js" type="text/javascript"></script>
<script type="text/javascript">
function init(w){
	var userId=getParameter("id",window);
	var facingMode=getParameter("facingMode",window);
	stream.media($.trim(facingMode),$("#video")[0],"/topic/userId-"+userId);
}

//获取地址栏参数
function getParameter(name,win){
    var params;
    if(null==win||undefined==win){
        params = window.location.search;
    }else{
        params = win.location.search;
    }
    params = params.substring(1, params.length);
    params = params.split("&");
    for (var i =0; i < params.length; i++){
        var items = params[i].split("=");
        var pname = items[0];
        if(pname == name){
            return items[1];
        }
    }
}
</script>
</html>